package com.person.mapper;

import com.person.pojo.Orders;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrderMapper {
    void insert(Orders orders);

    /**
     * 前台获取当前用户订单
     * @param userId
     * @return
     */
    List<Orders> getPage(Long userId);

    /**
     * 后台获取所有订单
     * @param beginTime
     * @param endTime
     * @param number
     * @return
     */
    List<Orders> getPageAll(LocalDateTime beginTime, LocalDateTime endTime, String number);

    /**
     * 更细订单状态
     * @param orders
     * @return
     */
    int updateStatus(Orders orders);
}
